# -*- coding: utf-8 -*-
from openerp import http

class Academy(http.Controller):

    @http.route('/academy/',auth='public',website=True)
    def index(self):
        Teachers = http.request.env['jeff_academy.teachers']
        return http.request.render('jeff_academy.index',{
            'teachers':Teachers.search([]),
        })

    @http.route('/academy/<model("jeff_academy.teachers"):teacher>/',auth='public',website=True)
    def teacher(self,teacher):
        return http.request.render('jeff_academy.biography',{
            'person':teacher
        })